package cn.seaboot.admin.store.service;

import cn.seaboot.admin.store.bean.StoreFormSet;
import cn.seaboot.admin.store.dao.StoreFormSetDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Service
 * 多表单集合 [t_store_form_set]
 *
 * @author Mr.css on 2018-6-20
 */
@Service
public class StoreFormSetService {

    @Resource
    private StoreFormSetDao storeFormSetDao;

    /**
     * 增
     *
     * @param pojo pojo
     * @return affected rows
     */
    public int insert(StoreFormSet pojo) {
        return storeFormSetDao.insert(pojo);
    }

    /**
     * 删
     *
     * @param id id
     * @return affected rows
     */
    public int deleteById(String id) {
        return storeFormSetDao.deleteById(id);
    }

    /**
     * 改
     *
     * @param pojo pojo
     * @return affected rows
     */
    public int updateById(StoreFormSet pojo) {
        return storeFormSetDao.updateSampleById(pojo);
    }

    /**
     * 查
     *
     * @param id id
     * @return pojo
     */
    public StoreFormSet queryById(String id) {
        return storeFormSetDao.selectById(id);
    }

    /**
     * 查列表
     *
     * @param params 参数
     * @return list
     */
    public List<StoreFormSet> queryList(Map<String, Object> params) {
        return storeFormSetDao.selectList(params);
    }
}